package com.weixin.paleituo.bean;

import android.text.TextUtils;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * 商品Bean扩展类，订单信息封装
 *
 * @author fengzhen
 * @version v1.0, 2018/4/5
 */
public class OrderGoods extends Goods implements Serializable {
    // 商品规格
    private ArrayList<GoodsSpecifBean> goodsSpecsList;
    // 有Vip价格
    private boolean isVip;
    // 可用优惠券金额
    private double couponMoney;
    // 商品规格拼接字段
    private String goodsSpecsInfo;
    // 商品规格拼接id
    private String idlist;

    // 共享家需求新增数据
    private String msg;
    private int madeType;
    private int goodsId;

    public OrderGoods() {
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public int getMadeType() {
        return madeType;
    }

    public void setMadeType(int madeType) {
        this.madeType = madeType;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String customInfo) {
        this.msg = customInfo;
    }

    public String getIdlist() {
        return idlist;
    }

    public void setIdlist(String idlist) {
        this.idlist = idlist;
    }

    public String getGoodsSpecsInfo() {
        return goodsSpecsInfo;
    }

    public void setGoodsSpecsInfo(String goodsSpecsInfo) {
        this.goodsSpecsInfo = goodsSpecsInfo;
    }

    public double getCouponMoney() {
        return couponMoney;
    }

    public void setCouponMoney(double couponMoney) {
        this.couponMoney = couponMoney;
    }

    public boolean isVip() {
        if (TextUtils.isEmpty(getSpecialSales())){
            return false;
        }
        if (Double.valueOf(getSpecialSales()) <= 0){
            return false;
        }
        return true;
    }

    public void setVip(boolean vip) {
        isVip = vip;
    }

    public int getCount() {
        return getGoodsSalenum();
    }

    public void setCount(int count) {
        setGoodsSalenum(count);
    }

    public ArrayList<GoodsSpecifBean> getGoodsSpecsList() {
        return goodsSpecsList;
    }

    public void setGoodsSpecsList(ArrayList<GoodsSpecifBean> goodsSpecsList) {
        this.goodsSpecsList = goodsSpecsList;
    }
}
